package com.hxzy.tms;

import org.hibernate.Session;

public class HibernateSessionHolder {
	private static ThreadLocal<Session> local=new ThreadLocal<Session>();

	public static final Session get(){
		return local.get();
	}
	public static final void set(Session session){
		//if(local.get()==null){
			local.set(session);
			session.beginTransaction();
		//}
	}
	
}
